package org.base.sys.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.base.common.annotation.JsonEnum;
import org.base.common.pojo.BasePojo;
import org.base.sys.enums.Sex;
import org.base.sys.enums.UserStatus;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户信息
 * </p>
 *
 * @author AutoGenerator
 * @since 2020-05-27
 */
@Data
@Accessors(chain = true)
@TableName("t_sys_user")
@ApiModel(value = "SysUser对象", description = "用户信息")
public class SysUser extends BasePojo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "登录账号")
    private String loginName;

    @ApiModelProperty(value = "用户昵称")
    private String userName;

    @ApiModelProperty(value = "用户类型（0系统用户 1 商户）")
    private Integer userType;

    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @ApiModelProperty(value = "手机号码")
    private String phoneNumber;

    @ApiModelProperty(value = "用户性别（0未知 1男 2女 ）")
    @JsonEnum(Sex.class)
    private Integer sex;

    @ApiModelProperty(value = "头像路径")
    private String avatar;

    @ApiModelProperty(value = "密码")
    @JsonIgnoreProperties(allowSetters = true)
    private String password;

    @ApiModelProperty(value = "盐加密")
    @JsonIgnore
    private String salt;

    @ApiModelProperty(value = "帐号状态（0正常 1停用）")
    @JsonEnum(UserStatus.class)
    private Integer status;

    @ApiModelProperty(value = "最后登陆IP")
    private String loginIp;

    @ApiModelProperty(value = "最后登陆时间")
    private LocalDateTime loginDate;

    @ApiModelProperty(value = "备注")
    private String remark;


}
